package com.zxl.thread;

public class ThreadEx extends Thread {

	private String name;
	
	public ThreadEx(String name) {
		this.name=name;
	}

	@Override
	public void run() {
		for (int i = 0; i < 5; i++) {
			System.out.println(name+":"+i);
		}
	}

	public static void main(String[] args) {
		ThreadEx t1=new ThreadEx("a");
		t1.start();
		ThreadEx t2=new ThreadEx("b");
		t2.start();
	}
}
